﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace @string
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string oristr = textBox1.Text.Trim();
            oristr = oristr.Replace(" ", "");/*去读空格*/
            if(checkBox1.Checked==true)
                oristr = oristr.Replace("-","");
            textBox2.Text = oristr;
           // checkBox1.Checked  = true;主动设置打钩
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
           
        }
    }
}
